$menuWidth: 130px;
$menuHeight: 30px;
$subMenuWidth: 120px;

.mask {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9998;
}

.contextmenu {
    position: fixed;
    z-index: 9999;
    user-select: none;
}

.menu-content {
    width: $menuWidth;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 1px 1px 10px #d3d3d3;
    border-radius: 4px;
    list-style: none;
    margin: 0;
    overflow: hidden;
}

.menu-item {
    padding: 0 20px;
    color: #555;
    font-size: 12px;
    transition: all .2s;
    white-space: nowrap;
    height: $menuHeight;
    line-height: $menuHeight;
    background-color: #fff;
    cursor: pointer;

    &:not(.disable):hover>.menu-item-content>.sub-menu {
        display: block;
    }

    &:not(.disable):hover>.has-children.has-handler::after {
        transform: scale(1);
    }

    &:hover:not(.disable)

    &.divider {
        height: 1px;
        overflow: hidden;
        margin: 5px;
        background-color: #e5e5e5;
        line-height: 0;
        padding: 0;
    }

    &.disable {
        color: #b1b1b1;
        cursor: no-drop;
    }
    &:hover {
        background: #e0e0e0;
    }
}

.menu-item-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;

    &.has-children::before {
        content: '';
        display: inline-block;
        width: 8px;
        height: 8px;
        border-width: 1px;
        border-style: solid;
        border-color: #666 #666 transparent transparent;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%) rotate(45deg);
    }

    &.has-children.has-handler::after {
        content: '';
        display: inline-block;
        width: 1px;
        height: 24px;
        background-color: #f1f1f1;
        position: absolute;
        right: 18px;
        top: 3px;
        transform: scale(0);
        transition: transform .2s;
    }

    .sub-text {
        opacity: 0.6;
    }

    .sub-menu {
        width: $subMenuWidth;
        position: absolute;
        display: none;
        left: 112%;
        top: -6px;
    }
}